<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	
	<body>
		<style>
			#loginForm{
				background-color:lightblue;
				width:300px;
				margin:200px auto;
			}
		</style>
	</body>
	</head>
	<body>
		<div id="app">
			<div id="loginForm">
				<h1 style="text-align:center;">用户登录</h1>
				<div>
					用户名:<input type="text"/>
				</div>
				<div>密码:<input type="password"/></div>
				<div><button>登录</button></div>
			</div>
		</div>
		<script>
			var app=Vue.createApp({
				data(){
					return{
						username:'',
						password:''
					}
				},
				methods:{
					login:function(){
						console.log("login")
						if(this.username=="admin"&&this.password=="123")
						{
							alert("登陆成功")
						}
						else{
							alert("登陆失败")
						}
					},
					loginOut:function(){
						this.islogin=false;
					}
				}
			})
		</script>
	</body>
</html>
